package fileDemo;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class Demo10 {
    public static void main(String[] args) throws FileNotFoundException {
        try(InputStream i=new FileInputStream("D:/Project/java/java-biog/"  +
                "Day20250312/IO测试文件目录/测试图片.png")){
            while(true){
                byte[] b=new byte[1024];
                int n=i.read(b);
                if(n==-1) break;
                for (int j = 0; j < n; j++) {
                    System.out.println(n);
                }
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
